# -*- coding: utf-8 -*-
"""
@Time ： 2022/7/23 21:42
@Auth ： Mr. William 1052949192
@Company ：特斯汀学院 @testingedu.com.cn
@Function ：请输入模块功能描述
"""
import sys
import time

# from class6.homework import *
#
# # 由升序排成降序
# h = [i for i in range(2000)]
# my_sort.bub_sort(h)
#
# # 由升序排成降序
# h = [i for i in range(2000)]
# my_sort.select_sort(h)
#
# # 修改默认堆栈大小
# sys.setrecursionlimit(10000000)
# t1 = time.time()
# h = [i for i in range(2000, 0, -1)]
# my_sort.quicksort(h, 0, len(h) - 1)
# t2 = time.time()
# print('快排：', round((t2 - t1) * 1000, 2), 'ms')


# 面向对象的调用
from class7.homework import MySort

mysort = MySort()
# 由升序排成降序
h = [i for i in range(2000)]
mysort.bub_sort(h)

# 由升序排成降序
h = [i for i in range(2000)]
mysort.select_sort(h)

# 修改默认堆栈大小
sys.setrecursionlimit(10000000)
t1 = time.time()
h = [i for i in range(2000, 0, -1)]
mysort.quicksort(h, 0, len(h) - 1)
t2 = time.time()
print('快排：', round((t2 - t1) * 1000, 2), 'ms')